package cn.edu.scau.cmi.liangzijian.decorator;

import java.util.ArrayList;
import java.util.List;

public class OriginalList implements MyList {
	private List<Person> list = new ArrayList<Person>(); 
	
	@Override
	public boolean add(Object o) {
		return list.add((Person)o);
	}

	@Override
	public Object remove(int index) {
		return list.remove(index);
	}
	
	@Override
	public void list() {
		for(Person p : list) {
			System.out.println(p.getName());
			System.out.println(p.getAge());
			System.out.println(p.getIdCard());
		}
	}

}
